package besteAukera;

import java.util.Vector;
//Chip bakoitzaren hanka bakoitza(indizea) zein chip-en sarrerekin dagoen lotuta
public class LoturenListak {
	private Vector<Loturak> lotLista=new Vector<Loturak>();

	private int indizea;

	public LoturenListak() {
		indizea = 0;

	}

	public void loturaGehitu(Loturak l) {
		lotLista.addElement(l);

	}
	public void loturaEzabatu(Loturak l){
		lotLista.removeElement(l);
	}

	public Loturak lortuLotura() {
		Loturak l2 = null;
		if (lotLista.capacity() > indizea) {
			//posible confusion entre array y vector
			l2 = lotLista.firstElement();
			indizea++;
			
		}
		return l2;
	}

	public int putLoturaKopurua() {
		return lotLista.capacity();
	}
	public Vector<Loturak> getLotLista(){
	return lotLista;
	}
}
